<template>
    <div>
        角色名:<van-field v-model="form.name"/>
        密码:<van-field v-model="form.password"/>
        <!-- 资源名称：<van-field v-model="url"/> -->
        <select v-model="list">
            <option :value="i.id" v-for="i in count">{{i.name}}</option>
        </select>
        <van-button @click="add">添加</van-button>

    </div>
</template>

<script>
    export default {
        data(){
            return{
                form:'',
                count:[],

                
            }
        },
        methods:{
            add(){
                this.$axios.post('admin',this.form).then(resp=>{

                })
            },
            getlist(){
                this.$axios.get('cate').then(res=>{
                    this.count=res.data.list
                })
            }
        },
        mounted(){
            this.getlist();
        }
        
    }
</script>

<style scoped>

</style>